/**
 * @fileOverview 圆形
 * @author goodzsq@gmail.com
 */

var BaseShape = gg.module('shape.Base');

var Circle = BaseShape.extend({
    area: function() {
        var r = this.get('radius');
        return Math.PI * r * r;
    },
    hasPoint: function(p) {
        var radius = this.get('radius');
        return distance <= radius;
    }
});

Circle.metadata = _.extend({}, BaseShape.metadata, {
    radius: {
        label: '中心点',
        type: 'datatype.Number',
        defaultValue: 1
    }
});

module.exports = Circle;